package com.ruoyi.commerce.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.commerce.mapper.CommerceInfoFacMapper;
import com.ruoyi.commerce.domain.CommerceInfoFac;
import com.ruoyi.commerce.service.ICommerceInfoFacService;

/**
 * 帮养之家和设施用品关联Service业务层处理
 * 
 * @author zhezhi
 * @date 2022-10-03
 */
@Service
public class CommerceInfoFacServiceImpl implements ICommerceInfoFacService 
{
    @Autowired
    private CommerceInfoFacMapper commerceInfoFacMapper;

    /**
     * 查询帮养之家和设施用品关联
     * 
     * @param infoId 帮养之家和设施用品关联主键
     * @return 帮养之家和设施用品关联
     */
    @Override
    public CommerceInfoFac selectCommerceInfoFacByInfoId(Long infoId)
    {
        return commerceInfoFacMapper.selectCommerceInfoFacByInfoId(infoId);
    }

    /**
     * 查询帮养之家和设施用品关联列表
     * 
     * @param commerceInfoFac 帮养之家和设施用品关联
     * @return 帮养之家和设施用品关联
     */
    @Override
    public List<CommerceInfoFac> selectCommerceInfoFacList(CommerceInfoFac commerceInfoFac)
    {
        return commerceInfoFacMapper.selectCommerceInfoFacList(commerceInfoFac);
    }

    /**
     * 新增帮养之家和设施用品关联
     * 
     * @param commerceInfoFac 帮养之家和设施用品关联
     * @return 结果
     */
    @Override
    public int insertCommerceInfoFac(CommerceInfoFac commerceInfoFac)
    {
        return commerceInfoFacMapper.insertCommerceInfoFac(commerceInfoFac);
    }

    /**
     * 修改帮养之家和设施用品关联
     * 
     * @param commerceInfoFac 帮养之家和设施用品关联
     * @return 结果
     */
    @Override
    public int updateCommerceInfoFac(CommerceInfoFac commerceInfoFac)
    {
        return commerceInfoFacMapper.updateCommerceInfoFac(commerceInfoFac);
    }

    /**
     * 修改帮养之家和设施用品关联（根据帮养设备改帮养之家）
     *
     * @param commerceInfoFac 帮养之家和设施用品关联
     * @return 结果
     */
    @Override
    public int updateFacToCommerceInfo(CommerceInfoFac commerceInfoFac) {
        return commerceInfoFacMapper.updateFacToCommer(commerceInfoFac);
    }


    /**
     * 批量删除帮养之家和设施用品关联
     * 
     * @param infoIds 需要删除的帮养之家和设施用品关联主键
     * @return 结果
     */
    @Override
    public int deleteCommerceInfoFacByInfoIds(Long[] infoIds)
    {
        return commerceInfoFacMapper.deleteCommerceInfoFacByInfoIds(infoIds);
    }

    /**
     * 删除帮养之家和设施用品关联信息
     * 
     * @param infoId 帮养之家和设施用品关联主键
     * @return 结果
     */
    @Override
    public int deleteCommerceInfoFacByInfoId(Long infoId)
    {
        return commerceInfoFacMapper.deleteCommerceInfoFacByInfoId(infoId);
    }
}
